]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellAppMonitor: Fix case of not seeing apps being closed
authorColin Walters <walters@verbum.org>
Thu, 6 Aug 2009 00:07:30 +0000 (20:07 -0400)
committerColin Walters <walters@verbum.org>
Thu, 6 Aug 2009 00:13:44 +0000 (20:13 -0400)
Remove the app from the window_to_app hash *before* emitting
CHANGED, otherwise a signal handler could see stale data.

src/shell-app-monitor.c

index 57107047eae64e476372e7c37ff62487d743cfdc..f3bf7050ef596a0113e21c0bea41f3cb5bc8bb4d 100644 (file)
@@ -532,10 +532,11 @@ shell_app_monitor_on_window_removed (MetaWorkspace   *workspace,
     self->watched_window = NULL;
 
   usage->window_count--;
+  /* Remove before emitting */
+  g_hash_table_remove (self->window_to_app, window);
+
   if (usage->window_count == 0)
     g_signal_emit (self, signals[CHANGED], 0);
-
-  g_hash_table_remove (self->window_to_app, window);
 }
 
 static void